home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / getdents.z / getdents
Encoding:
Text File  |  2002-10-03  |  8.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ggggeeeettttddddeeeennnnttttssss((((2222))))                                                        ggggeeeettttddddeeeennnnttttssss((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggeeeettttddddeeeennnnttttssss,,,, ggggeeeettttddddeeeennnnttttssss66664444,,,, nnnnggggeeeettttddddeeeennnnttttssss,,,, nnnnggggeeeettttddddeeeennnnttttssss66664444 - read directory entries and
  10.      put in a file system independent format
  11.  
  12. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ddddiiiirrrreeeennnntttt....hhhh>>>>
  14.  
  15.      iiiinnnntttt ggggeeeettttddddeeeennnnttttssss((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, ddddiiiirrrreeeennnntttt____tttt ****bbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnnbbbbyyyytttteeee))));;;;
  16.  
  17.      iiiinnnntttt ggggeeeettttddddeeeennnnttttssss66664444((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, ddddiiiirrrreeeennnntttt66664444____tttt ****bbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnnbbbbyyyytttteeee))));;;;
  18.  
  19.      iiiinnnntttt nnnnggggeeeettttddddeeeennnnttttssss((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, ddddiiiirrrreeeennnntttt____tttt ****bbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnnbbbbyyyytttteeee,,,, iiiinnnntttt ****eeeeooooffff))));;;;
  20.  
  21.      iiiinnnntttt nnnnggggeeeettttddddeeeennnnttttssss66664444((((iiiinnnntttt ffffiiiillllddddeeeessss,,,, ddddiiiirrrreeeennnntttt66664444____tttt ****bbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnnbbbbyyyytttteeee,,,, iiiinnnntttt ****eeeeooooffff))));;;;
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      _f_i_l_d_e_s is a file descriptor obtained from a _cccc_rrrr_eeee_aaaa_tttt, _oooo_pppp_eeee_nnnn, _dddd_uuuu_pppp, _ffff_cccc_nnnn_tttt_llll,
  25.      _pppp_iiii_pppp_eeee, or _iiii_oooo_cccc_tttt_llll system call.
  26.  
  27.      _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss attempts to read _n_b_y_t_e bytes from the directory associated with
  28.      _f_i_l_d_e_s and to format them as file system independent directory entries in
  29.      the buffer pointed to by _b_u_f.  Since the file system independent
  30.      directory entries are of variable length, in most cases the actual number
  31.      of bytes returned will be strictly less than _n_b_y_t_e. See _dddd_iiii_rrrr_eeee_nnnn_tttt(4) to
  32.      calculate the number of bytes.
  33.  
  34.      The file system independent directory entry is specified by the _dddd_iiii_rrrr_eeee_nnnn_tttt
  35.      structure.  For a description of this see _dddd_iiii_rrrr_eeee_nnnn_tttt(4).
  36.  
  37.      _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss starts at a position in the file given by the file pointer
  38.      associated with _f_i_l_d_e_s.  Upon return from _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss, the file pointer is
  39.      incremented to point to the next directory entry.
  40.  
  41.      This system call was developed in order to implement the _rrrr_eeee_aaaa_dddd_dddd_iiii_rrrr routine
  42.      [for a description, see _dddd_iiii_rrrr_eeee_cccc_tttt_oooo_rrrr_yyyy(3C)], and should not be used for other
  43.      purposes.
  44.  
  45.      _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss_6666_4444 is identical to _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss except that the _dddd_iiii_rrrr_eeee_nnnn_tttt_6666_4444______tttt structure
  46.      is used instead of the _dddd_iiii_rrrr_eeee_nnnn_tttt______tttt structure.  The _dddd_iiii_rrrr_eeee_nnnn_tttt_6666_4444______tttt structure can
  47.      return larger values for some fields.
  48.  
  49.      _nnnn_gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss and _nnnn_gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss_6666_4444 are identical to _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss and _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss_6666_4444,
  50.      respectively, except that the _e_o_f argument is present.  The value pointed
  51.      to by _e_o_f is set to 1 if end-of-file was encountered during the current
  52.      operation, 0 otherwise.  Use of this feature eliminates the necessity to
  53.      call _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss one more time (and get 0 returned) after the last data is
  54.      returned.
  55.  
  56.      _gggg_eeee_tttt_dddd_eeee_nnnn_tttt_ssss will fail if one or more of the following are true:
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggeeeettttddddeeeennnnttttssss((((2222))))                                                        ggggeeeettttddddeeeennnnttttssss((((2222))))
  71.  
  72.  
  73.  
  74.      _EEEE_BBBB_AAAA_DDDD_FFFF          _f_i_l_d_e_s is not a valid file descriptor open for reading.
  75.  
  76.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT         _b_u_f points outside the allocated address space.
  77.  
  78.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL         _n_b_y_t_e is not large enough for one directory entry.
  79.  
  80.      _EEEE_NNNN_OOOO_EEEE_NNNN_TTTT         The current file pointer for the directory is not located
  81.                     at a valid entry.
  82.  
  83.      _EEEE_NNNN_OOOO_LLLL_IIII_NNNN_KKKK        _f_i_l_d_e_s points to a remote machine and the link to that
  84.                     machine is no longer active.  is located on a remote file
  85.                     system which is not available [see _iiii_nnnn_tttt_rrrr_oooo(2)].
  86.  
  87.      _EEEE_TTTT_IIII_MMMM_EEEE_DDDD_OOOO_UUUU_TTTT      _f_i_l_d_e_s refers to a directory on a remote file system which
  88.                     is not available [see _iiii_nnnn_tttt_rrrr_oooo(2)].
  89.  
  90.      _EEEE_NNNN_OOOO_TTTT_DDDD_IIII_RRRR        _f_i_l_d_e_s is not a directory.
  91.  
  92.      _EEEE_IIII_OOOO            An I/O error occurred while accessing the file system.
  93.  
  94.      _EEEE_DDDD_IIII_RRRR_CCCC_OOOO_RRRR_RRRR_UUUU_PPPP_TTTT_EEEE_DDDD  The directory is corrupted in the file system.
  95.  
  96. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  97.      _dddd_iiii_rrrr_eeee_cccc_tttt_oooo_rrrr_yyyy(3C), _dddd_iiii_rrrr_eeee_nnnn_tttt(4)
  98.  
  99. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  100.      Upon successful completion a non-negative integer is returned indicating
  101.      the number of bytes actually read.  A value of 0 indicates the end of the
  102.      directory has been reached.  If the system call failed, a -1 is returned
  103.      and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.